In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a virtual machine monitor (VMM) manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a local or remote client. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems.
When a remote client disconnects from a virtual machine without shutting down the virtual machine, the host machine typically leaves the virtual machine running. Conventional host machines do not have any mechanism for saving a state of the virtual machine and automatically shutting the virtual machine down after detecting a client disconnect. This causes the host machines to unnecessarily use system resources for running unused virtual machines.